extends ./../layout.jade
append script
    script.
        $(function(){
            $('.popup').popup();
            $('.ui.dropdown').dropdown();
            $('.ui.pointing.secondary.menu a.item').eq(4).addClass('active');
        });
    script(src="/js/project.station.test.js")

block content
    br
    .ui.breadcrumb
        a.section(href="/home") 首页
        i.right.chevron.icon.divider
        a.section #{project.name}
        i.right.chevron.icon.divider
        a.section.active 断面关系配置
        
    h2.ui.header
        span.ui.header #{project.name}配置
        .sub.header 断面关系配置
    .ui.divider
    include navigator.jade
    .ui.message.warning
        | 点号的命名必须固定; &nbsp;&nbsp;&nbsp;&nbsp;
        | <strong>点号0</strong>:为该断面中心点; &nbsp;&nbsp;&nbsp;&nbsp;
        | <strong>点号</strong>:为测量棱镜; &nbsp;&nbsp;&nbsp;&nbsp;
        | <strong>点号1</strong>:为辅助棱镜
    div
        a.ui.button.red(href=url+'/caculateDiff') 计算断面初始偏量
        if caculated
            .ui.label.green(style="margin-top: 4px; float:right;") 已计算,点击将重新计算
    datalist#names
        option(value="pb")
        option(value="pb0")
        option(value="pb1")
        option(value="pf")
        option(value="pf0")
        option(value="pf1")
        option(value="st")
        option(value="st0")
        option(value="st1")
        option(value="ph0")
        option(value="ph")
    div
        form.ui.form(action='/project/'+project.id+'/sectionconfig',method="post")
            input(type="hidden" , value=project.id , name="prjId")
            table.ui.table.celled
                thead
                    th 点位名称
                    th E坐标
                    th N坐标
                    th H坐标
                    th 里程
                    th(style="width:200px;") 操作
                tbody
                    each section,index in sections
                        tr
                            td #{section.name} 
                            td #{section.e} 
                            td #{section.n} 
                            td #{section.h}
                            td #{section.mileage}
                            td
                                a.button.ui.grey(href='/project/'+project.id+'/sectionconfig/'+section.id+'/delete') 删除
                    tr
                        td
                            .field
                                input(type="text",name="name",required="required",placeholder="0后缀是中心,1后缀是辅助棱镜",list="names")
                        td
                            .field
                                input(type="text",name="e",required="required")
                        td
                            .field
                                input(type="text",name="n",required="required")
                        td
                            .field
                                input(type="text",name="h",required="required")
                        td
                            .field
                                input(type="text",name="mileage",required="required")
                        td
                            button.ui.blue.button(type="submit") 增加